<template>
  <div class="company_container">
    <form class="top_nav">
      <van-search
        class="search_btn"
        show-action
        v-model="value"
        placeholder="智能匹配"
        @search="onSearch"
        right-icon="clear"
        background="#3f51b5"
        @click="isAccessShowFn"
      >
        <template #action>
          <van-dropdown-menu @click="onSearch" active-color="#000">
            <van-dropdown-item v-model="value1" :options="option" />
          </van-dropdown-menu>
        </template>
      </van-search>
    </form>
    <!-- 展示行关键字 -->
    <van-row class="item" gutter="20" type="flex">
      <van-col class="key_words">
        <van-button round size="small" type="default">月嫂</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small" type="default">保姆</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small">育婴师</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small">产康师</van-button>
      </van-col>
      <van-col class="key_words" style="padding-left: 0; padding-right: 0">
        <van-button round size="small">家装/搬家</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small">早教/托管</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small">养老/陪护</van-button>
      </van-col>
      <van-col class="key_words" style="padding-left: 0; padding-right: 0">
        <van-button round size="small">保洁/清洗</van-button>
      </van-col>
      <van-col class="key_words">
        <van-button round size="small">全部职业</van-button>
      </van-col>
    </van-row>
    <hr />
    <!-- 家政人员详细信息 -->
    <div class="com_info">
      <div class="com_info_right">
        <van-image fit="cover" src="https://img01.yzcdn.cn/vant/cat.jpeg" />
      </div>
      <div class="com_info_left">
        <h6>张丽丽</h6>
        <span class="price">8000元/26天</span>
        <div class="describe">
          <van-button round size="small">三星育婴师</van-button>
          <van-button round size="small">服务好</van-button>
          <van-button round size="small">6年经验</van-button>
        </div>
        <span class="perfect">湖南长沙|41岁|服务13户|评价13条</span>
      </div>
    </div>
    <it-access ref="itAccess" />
  </div>
</template>

<script>
import ItAccess from './components/it-access.vue'
import { Toast } from 'vant'
export default {
  name: 'homecompany',
  components: {
    ItAccess,
  },
  data () {
    return {
      value: '',
      value1: 0,
      option: [
        { text: '长沙', value: 0 },
        { text: '武汉', value: 1 },
      ],
    }
  },
  methods: {
    onSearch (val) {
      Toast(val)
    },
    isAccessShowFn () {
      this.$refs.itAccess.showDialog()
    },
  },
}
</script>
<style scoped>
.company_container /deep/ .van-dropdown-menu__bar {
  background-color: #3f51b5 !important;
}
.company_container /deep/ .van-dropdown-menu__bar .van-dropdown-menu__title {
  color: #fff;
}
</style>

<style lang="scss" scoped>
.company_container {
  .van-search--show-action {
    padding-right: 20px;
  }
  .van-search__action {
    padding: 0;
  }
  // background-color: silver;
  position: relative;
  z-index: 999999999999;
  .item {
    padding-left: 30px;
    padding-right: 30px;
    margin-bottom: 5px;
    background-color: #fff;
    .key_words {
      color: #979191;
      .van-button {
        // width: 150px;
        height: 50px;
        line-height: 50px;
        border: 2px solid #979191;
        .van-button__text {
          margin-left: 20px;
          margin-right: 20px;
          font-size: 12px;
          color: #979191;
        }
        .blue {
          color: rgb(66, 66, 241);
          border: 2px solid rgb(66, 66, 241);
        }
      }
    }
  }
  hr {
    border: 10px solid #e9e7e7;
    background-color: #e9e7e7;
  }
  // 公司信息
  .com_info {
    display: flex;
    margin-bottom: 20px;
    margin-left: 25px;
    margin-right: 25px;
    border-bottom: 1px solid #b5b2b1;
    // height: 320px;
    .com_info_right {
      flex: 1;

      .van-image {
        width: 180px !important;
        height: 180px !important;
      }
      .location_info {
        display: block;
        font-size: 12px;
      }
    }
    .com_info_left {
      position: relative;
      .price {
        position: absolute;
        top: 5px;
        right: 30px;
        font-size: 20px;
        color: #b5b2b1;
      }
      flex: 2;
      h6 {
        margin: 6px 0;
        font-size: 14px;
      }
      .perfect {
        font-size: 12px;
        color: #b5b2b1;
      }
      .describe {
        .van-button {
          border: 1px solid #3f51b5;
          height: 45px;
          color: #3f51b5;
          margin-right: 8px;
        }
      }
      .detail_location {
        font-size: 12px;
      }
    }
  }
}
</style>
